package com.entity;

/**
 * Created by Administrator on 2017/3/11.
 */
public class User {
    private String account;
    private String password;
    private String superpassword;
    private int privilege;

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSuperpassword() {
        return superpassword;
    }

    public void setSuperpassword(String superpassword) {
        this.superpassword = superpassword;
    }

    public int getPrivilege() {
        return privilege;
    }

    public void setPrivilege(int privilege) {
        this.privilege = privilege;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        User user = (User) o;

        if (privilege != user.privilege) return false;
        if (account != null ? !account.equals(user.account) : user.account != null) return false;
        if (password != null ? !password.equals(user.password) : user.password != null) return false;
        if (superpassword != null ? !superpassword.equals(user.superpassword) : user.superpassword != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = account != null ? account.hashCode() : 0;
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + (superpassword != null ? superpassword.hashCode() : 0);
        result = 31 * result + privilege;
        return result;
    }
}
